import Vue from 'vue'
import store from '@/store'

import { asyncRoutes } from '@/router/index'
Vue.directive('auth-btn', {
  inserted(el, buining) {
    const perm = store.state.user.routes
    if (!perm.includes(buining.value) && !perm.includes(asyncRoutes)) {
      el.remove()
    }
  }
})
